package huian.lee.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the membership table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="membership"
 */

public abstract class BaseMembership  implements Serializable {

	public static String REF = "Membership";
	public static String PROP_USERINFO = "userinfo";
	public static String PROP_BEGINTIME = "begintime";
	public static String PROP_ID = "id";
	public static String PROP_SHOPINFO = "shopinfo";
	public static String PROP_ENDTIME = "endtime";


	// constructors
	public BaseMembership () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseMembership (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer userinfo;
	private java.lang.Integer shopinfo;
	private java.util.Date begintime;
	private java.util.Date endtime;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: userinfo
	 */
	public java.lang.Integer getUserinfo () {
		return userinfo;
	}

	/**
	 * Set the value related to the column: userinfo
	 * @param userinfo the userinfo value
	 */
	public void setUserinfo (java.lang.Integer userinfo) {
		this.userinfo = userinfo;
	}



	/**
	 * Return the value associated with the column: shopinfo
	 */
	public java.lang.Integer getShopinfo () {
		return shopinfo;
	}

	/**
	 * Set the value related to the column: shopinfo
	 * @param shopinfo the shopinfo value
	 */
	public void setShopinfo (java.lang.Integer shopinfo) {
		this.shopinfo = shopinfo;
	}



	/**
	 * Return the value associated with the column: begintime
	 */
	public java.util.Date getBegintime () {
		return begintime;
	}

	/**
	 * Set the value related to the column: begintime
	 * @param begintime the begintime value
	 */
	public void setBegintime (java.util.Date begintime) {
		this.begintime = begintime;
	}



	/**
	 * Return the value associated with the column: endtime
	 */
	public java.util.Date getEndtime () {
		return endtime;
	}

	/**
	 * Set the value related to the column: endtime
	 * @param endtime the endtime value
	 */
	public void setEndtime (java.util.Date endtime) {
		this.endtime = endtime;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof huian.lee.entity.Membership)) return false;
		else {
			huian.lee.entity.Membership membership = (huian.lee.entity.Membership) obj;
			if (null == this.getId() || null == membership.getId()) return false;
			else return (this.getId().equals(membership.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}